/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package prueba.view.html;

import prueba.view.resolver.code.ContextCodeResolveView;

/**
 *
 * @author cmf
 */
public abstract class ElementSupport extends JavascriptElementSupport {

    private String id;
    private String classe;
    private String title;
    private String dir;
    private String lang;
    private String onclick;
    private String style;
    public ContextCodeResolveView codeResolveView;

    public ElementSupport() {
    }

    /**
     *
     *
     * @return codeResolveView "iinyecta" en las subclases
     * el contextcodeResolveView
     *
     *
     * */
    public ContextCodeResolveView getContextCodeResolveView() {
        return codeResolveView.getInstance();
    }

    /***
     *
     *
     *
     *
     *
     *
     */
    public StringBuffer printAttributes() {
        StringBuffer buffer = new StringBuffer();
        if (getId() != null) {
            buffer.append(" id=\"" + getId() + "\"");
        }

        if (getClasse() != null) {
            buffer.append(" class=\"" + getClasse() + "\"");
        }

        if (getLang() != null) {
            buffer.append(" lang=\"" + getLang() + "\" ");
        }

        if (getStyle() != null) {
            buffer.append(" style=\"" + getStyle() + "\" ");
        }
        return buffer;


    }

    /***
     *
     *
     *
     *
     *
     *
     */
    public String getClasse() {
        return classe;
    }

    /***
     *
     *
     *
     *
     *
     *
     */
    public void setClasse(String classe) {
        this.classe = classe;
    }

    /***
     *
     *
     *
     *
     *
     *
     */
    public String getDir() {
        return dir;
    }

    /***
     *
     *
     *
     *
     *
     *
     */
    public void setDir(String dir) {
        this.dir = dir;
    }

    /***
     *
     *
     *
     *
     *
     *
     */
    public String getId() {
        return id;
    }

    /***
     *
     *
     *
     *
     *
     *
     */
    public void setId(String id) {
        this.id = id;
    }

    /***
     *
     *
     *
     *
     *
     *
     */
    public String getLang() {
        return lang;
    }

    /***
     *
     *
     *
     *
     *
     *
     */
    public void setLang(String lang) {
        this.lang = lang;
    }

    /***
     *
     *
     *
     *
     *
     *
     */
    public String getOnclick() {
        return onclick;
    }

    /***
     *
     *
     *
     *
     *
     *
     */
    public void setOnclick(String onclick) {
        this.onclick = onclick;
    }

    /***
     *
     *
     *
     *
     *
     *
     */
    public String getStyle() {
        return style;
    }

    /***
     *
     *
     *
     *
     *
     *
     */
    public void setStyle(String style) {
        this.style = style;
    }

    /***
     *
     *
     *
     *
     *
     *
     */
    public String getTitle() {
        return title;
    }

    /***
     *
     *
     *
     *
     *
     *
     */
    public void setTitle(String title) {
        this.title = title;
    }
}
